<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>边框选择按钮效果</title>
</head>
<style>
  button{
    position: relative;
    width: 200px;
    height: 100px;
    font-size: 30px;
    border: 0;
    border-radius: 5px;
    background-color: transparent;
    outline: 5px solid #f40;
    overflow: hidden;
  }
  button::after{
    content: "";
    position: absolute;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    top: 5px;
    left: 5px;
    background-color: wheat;
    z-index: -1;

  }
  button::before{
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-color: violet;
    left: 50%;
    top: 50%;
    z-index: -2;
    transform-origin: 0 0;
animation: rotation 3s infinite linear;
  }
@keyframes rotation{
    to{
        transform: rotate(1turn);
    }
}
</style>
<body>
<button>边框按钮</button>
</body>
</html>